package eteam.aps.systemservice.dal;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import eteam.aps.systeminterface.model.entity.FlowBillPropertyEntity;
import eteam.aps.systemservice.dal.mapper.FlowBillPropertyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FlowBillPropertyDal {

    @Autowired
    private FlowBillPropertyMapper flowBillPropertyMapper;


    /**
     * 根据流程单据id获取流程单据属性entity类
     *
     * @param fFlowBillId
     * @return
     */
    public List<FlowBillPropertyEntity> getPropertyByFlowBillId(String systemId,String worksheetName) {
        QueryWrapper<FlowBillPropertyEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("FBillName",worksheetName);
        queryWrapper.eq("FSubSYS",systemId);
        List<FlowBillPropertyEntity> flowBillPropertyEntities = flowBillPropertyMapper.selectList(queryWrapper);
        return flowBillPropertyEntities;
    }
}
